<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

<xsl:template match="/">
	<html>
	<body>
	<table border="1">
		<tr>
			<th>To</th>
			<th>From</th>
			<th>Title</th>
			<th>SendTime</th>
		</tr>
		<xsl:for-each select="data/email">
		<!-- 根据发送时间排序 -->
		<xsl:sort select="sendTime" order="descending" />
		<tr>
			<td><xsl:value-of select="to" /></td>
			<td><xsl:value-of select="from" /></td>
			<td><xsl:value-of select="title" /></td>
			<td><xsl:value-of select="sendTime" /></td>
		</tr>
		</xsl:for-each>
	</table>
	</body>
	</html>
</xsl:template>
</xsl:stylesheet>